package com.cskaoyan.bean.vo;

import com.cskaoyan.bean.po.MarketTopic;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class AdminTopicReadVo {
    /**
     * goodsList : []
     * topic : {"picUrl":"http://182.92.235.201:8083/wx/storage/fetch/i9j0ceec2d5u0cpp09vq.jpg","deleted":false,"addTime":"2022-09-08 08:23:56","price":99,"subtitle":"中秋佳节","sortOrder":100,"goods":[],"updateTime":"2022-09-08 08:23:56","id":333,"title":"中秋节","readCount":"7777","content":"<p>11ad<\/p>"}
     */
    private List<?> goodsList = new ArrayList<>();
    private TopicEntity topic = new TopicEntity();

    public void setTopicEntity(MarketTopic marketTopic){
        BeanUtils.copyProperties(marketTopic,topic);
    }

    public void setGoodsList(List<?> goodsList) {
        this.goodsList = goodsList;
    }

    public void setTopic(TopicEntity topic) {
        this.topic = topic;
    }

    public List<?> getGoodsList() {
        return goodsList;
    }

    public TopicEntity getTopic() {
        return topic;
    }

    @Data
    public class TopicEntity {
        /**
         * picUrl : http://182.92.235.201:8083/wx/storage/fetch/i9j0ceec2d5u0cpp09vq.jpg
         * deleted : false
         * addTime : 2022-09-08 08:23:56
         * price : 99.0
         * subtitle : 中秋佳节
         * sortOrder : 100
         * goods : []
         * updateTime : 2022-09-08 08:23:56
         * id : 333
         * title : 中秋节
         * readCount : 7777
         * content : <p>11ad</p>
         */
        private String picUrl;
        private Boolean deleted;
        private Date addTime;
        private BigDecimal price;
        private String subtitle;
        private Integer sortOrder;
        private Integer[] goods;
        private Date updateTime;
        private Integer id;
        private String title;
        private String readCount;
        private String content;
    }
}